﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="_GoodSalesEdit.aspx.cs" Inherits="BalanceCenter__GoodSalesEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>山顶软件 - 购买商品</title>
    <base target="_self" />
    <link href="../Style/css.css" type="text/css" rel="stylesheet">
    <link href="../Style/main.css" type="text/css" rel="stylesheet">

    <script language="javascript" type="text/javascript">
    
        function AmountChange()
        {
            var Amount = document.getElementById("tbAmount").value;
            
            if(Amount != "")
            {
                for(var i=0; i<Amount.length; i++)
                {
                    if(Amount.charAt(i)<'0' || Amount.charAt(i)>'9')
                    {
                        alert("请输入正确的购买数量!");
                        document.getElementById("tbAmount").value = "";
                        
                        return false;
                    }
                    else
                    {
                        var Price = document.getElementById("hGoodTypePrice").value;
                                                
                        document.getElementById("tbSumPrice").value = Price * Amount;                    
                    }
                }
            }
            else
            {
                //alert("请输入正确的购买数量！");
                document.getElementById("tbAmount").value = "";
                
                return false;
            }
        }
               
    </script>
</head>
<body bottommargin="0" leftmargin="0" topmargin="0" rightmargin="0" >
    <form id="form1" runat="server">
    <center>
        <%--<a id="reload" href="GoodSalesEdit.aspx" style="display:none"></a>--%>
        
        <table border="0" cellpadding="0" cellspacing="0" width="450px">
            <tr>
                <td style="height: 50px" align="center">
                    <span style="font-size: 12pt; color: #3399cc"><strong>购买商品</strong></span>
                </td>
            </tr>
            <tr>
                <td align="center" style="height: 138px" valign="top">
                    <table align="center" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td width="9">
                                <img height="19" src="../Images/Table1/table_leftUp.jpg" width="9" />
                            </td>
                            <td background="../Images/Table1/table_Up.jpg">
                                &nbsp;
                            </td>
                            <td width="9">
                                <img height="19" src="../Images/Table1/table_rightUp.jpg" width="9" />
                            </td>
                        </tr>
                        <tr>
                            <td background="../Images/Table1/table_left.jpg" width="9">
                                &nbsp;
                            </td>
                            <td bgcolor="#f5faff">
                                <table id="Table2" bgcolor="#ffffff" border="0" bordercolor="#ffffff" cellpadding="0"
                                    cellspacing="1" style="border-collapse: collapse" width="100%">
                                    <tr>
                                        <td align="center" bgcolor="#dae6f3" style="width: 450px">
                                            <asp:Image ID="ImageTypePic" runat="server" Width="200px" Height="100px" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" bgcolor="#dae6f3" style="width: 450px">
                                            商品名称：
                                            <asp:TextBox ID="tbGoodName" runat="server" Enabled="false" Width="150px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" bgcolor="#dae6f3" style="width: 450px">
                                            商品价格：
                                            <asp:TextBox ID="tbPrice" runat="server" Enabled="false" Width="150px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" bgcolor="#dae6f3" style="width: 450px">
                                            购买数量：
                                            <asp:TextBox ID="tbAmount" runat="server" Width="150px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" bgcolor="#dae6f3" style="width: 450px">
                                            支付方式：
                                            <asp:DropDownList ID="ddlPayType" runat="server" Width="150px">
                                                <%--<asp:ListItem Value="2">电子货币</asp:ListItem>
                                                <asp:ListItem Value="3">返还货币</asp:ListItem>--%>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" bgcolor="#dae6f3" style="width: 450px">
                                            &nbsp;&nbsp;&nbsp;&nbsp;合 计：
                                            <asp:TextBox ID="tbSumPrice" runat="server" Width="150px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" bgcolor="#dae6f3" style="width: 450px">
                                            备注：<asp:TextBox ID="tbRemark" TextMode="MultiLine" runat="server" Width="250px" Height="80px"></asp:TextBox>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td background="../Images/Table1/table_right.jpg" width="9">
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td width="9">
                                <img height="21" src="../Images/Table1/table_leftDown.jpg" width="9" />
                            </td>
                            <td background="../Images/Table1/table_Down.jpg">
                                &nbsp;
                            </td>
                            <td width="9">
                                <img height="21" src="../Images/Table1/table_rightDown.jpg" width="9" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3" style="text-align: center;">
                                <asp:Button ID="btnOK" runat="server" Text="确认购买" Width="90px" OnClick="btnOK_Click" />
                                <%--<asp:Button ID="btnCancel" runat="server" Visible="false" Text=" 返  回 " Width="90px" 
                                    onclick="btnCancel_Click" />--%>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </center>
    <input id="hID" type="hidden" runat="server" />
    <input id="hGoodTypePrice" type="hidden" runat="server" />
    </form>
</body>
</html>
